package com.swgk.core.view.adapter;

import android.content.Context;

import androidx.annotation.LayoutRes;

import com.swgk.core.R;
import com.swgk.core.databinding.TopViewImgBinding;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

/**
 * @author : younghow
 * @date : 2021/11/19 10:57
 * description:
 */
public class TopViewHorizontalAdapter extends BaseRecycleAdapter<Integer> {

    public TopViewHorizontalAdapter(Context context, List<Integer> datas) {
        super(context, R.layout.top_view_img, datas);
    }

    public TopViewHorizontalAdapter(Context context, List<Integer> datas, @LayoutRes int layoutId) {
        super(context, layoutId, datas);
    }

    @Override
    public void convert(ItemViewHolder holder, final Integer entity) {
        TopViewImgBinding mBinding = (TopViewImgBinding) holder.getmBinding();
        mBinding.ivTeamMainPicture.setBackgroundResource(entity);
    }
}
